package com.robot.topology.strategy.deterministic;

import com.robot.topology.graph.domain.Edge;
import com.robot.topology.tools.StrategyTools;

public class ShortestPathInc extends Deterministic {

	public static final Double shortINCRatio = (double)0.2;
	public static final Double shortINCReward = (double) 1;
	public static final Double shortINCPunish = (double) 0;
	
	public ShortestPathInc() {
		this.setRatio(shortINCRatio);
		this.setReward(shortINCReward);
		this.setPunishment(shortINCPunish);
	}

	@Override
	public void updateEdgeToReward(Edge edgeTUpdate) {
		edgeTUpdate.setWeight(StrategyTools.invProportionalInc(edgeTUpdate.getWeight(),  this.getRatio(), this.getPunishment(),  this.pathLength));
	}

	@Override
	public void updateEdgeToPunish(Edge edgeTUpdate) {
		edgeTUpdate.setWeight(StrategyTools.invProportionalInc(edgeTUpdate.getWeight(),  this.getRatio(), this.getPunishment(),  this.pathLength));
	}

}
